/** @type {import('tailwindcss').Config} */
module.exports = {
	darkMode: ['class'],
	content: [
		'./pages/**/*.{ts,tsx}',
		'./components/**/*.{ts,tsx}',
		'./app/**/*.{ts,tsx}',
		'./src/**/*.{ts,tsx}',
	],
	theme: {
		container: {
			center: true,
			padding: '2rem',
			screens: {
				'2xl': '1200px',
			},
		},
		extend: {
			fontFamily: {
				primary: ['Inter', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Microsoft YaHei', 'sans-serif'],
				mono: ['Courier New', 'Monaco', 'monospace'],
			},
			colors: {
				// 主色调（品牌色）
				primary: {
					50: '#E6F0FF',
					100: '#CCE0FF',
					500: '#0066FF',
					600: '#0052CC',
					900: '#003D99',
				},
				// 中性色
				neutral: {
					50: '#FAFAFA',
					100: '#F5F5F5',
					200: '#E5E5E5',
					300: '#D4D4D4',
					500: '#A3A3A3',
					700: '#404040',
					900: '#171717',
				},
				// 棋盘专用色
				board: {
					background: '#F5F2E8',
					line: '#1A1A1A',
					point: '#666666',
				},
				// 棋子色彩
				piece: {
					black: '#000000',
					blackShine: '#333333',
					white: '#FFFFFF',
					whiteShadow: '#CCCCCC',
					hover: 'rgba(0, 102, 255, 0.3)',
				},
				// 语义色
				semantic: {
					success: '#10B981',
					warning: '#F59E0B',
					error: '#EF4444',
				},
				// 保留原有设计系统
				border: 'hsl(var(--border))',
				input: 'hsl(var(--input))',
				ring: 'hsl(var(--ring))',
				background: 'hsl(var(--background))',
				foreground: 'hsl(var(--foreground))',
				secondary: {
					DEFAULT: 'hsl(var(--secondary))',
					foreground: 'hsl(var(--secondary-foreground))',
				},
				accent: {
					DEFAULT: 'hsl(var(--accent))',
					foreground: 'hsl(var(--accent-foreground))',
				},
				destructive: {
					DEFAULT: 'hsl(var(--destructive))',
					foreground: 'hsl(var(--destructive-foreground))',
				},
				muted: {
					DEFAULT: 'hsl(var(--muted))',
					foreground: 'hsl(var(--muted-foreground))',
				},
				popover: {
					DEFAULT: 'hsl(var(--popover))',
					foreground: 'hsl(var(--popover-foreground))',
				},
				card: {
					DEFAULT: 'hsl(var(--card))',
					foreground: 'hsl(var(--card-foreground))',
				},
			},
			// 间距系统（8点网格）
			spacing: {
				'2': '8px',
				'4': '16px',
				'6': '24px',
				'8': '32px',
				'12': '48px',
				'16': '64px',
				'24': '96px',
			},
			// 圆角系统
			borderRadius: {
				sm: '8px',
				md: '12px',
				lg: '16px',
				xl: '24px',
				full: '9999px',
				// 保留原有设计系统
				DEFAULT: 'var(--radius)',
				'md-legacy': 'calc(var(--radius) - 2px)',
				'sm-legacy': 'calc(var(--radius) - 4px)',
			},
			// 字体大小系统
			fontSize: {
				'game-title': '48px',
				'mode-title': '32px',
				'status-large': '24px',
				'timer': '20px',
				'body': '16px',
				'small': '14px',
				'game-title-mobile': '36px',
				'mode-title-mobile': '24px',
				'status-mobile': '18px',
			},
			// 阴影系统
			boxShadow: {
				card: '0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06)',
				'card-hover': '0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05)',
				modal: '0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)',
				'piece-black': '0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2)',
				'piece-white': '0 2px 4px rgba(0, 0, 0, 0.15), inset 0 -1px 2px rgba(0, 0, 0, 0.1)',
			},
			// 尺寸系统
			size: {
				'board-desktop': '600px',
				'board-tablet': '480px',
				'piece-desktop': '30px',
				'piece-mobile': '24px',
				'button-height': '48px',
				'touch-target': '44px',
				'navbar-desktop': '64px',
				'navbar-tablet': '56px',
				'navbar-mobile': '48px',
				'control-panel': '240px',
			},
			// 动画时长
			transitionDuration: {
				fast: '200ms',
				normal: '250ms',
				slow: '300ms',
			},
			// 缓动函数
			transitionTimingFunction: {
				easeOut: 'cubic-bezier(0, 0, 0.2, 1)',
				easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
			},
			keyframes: {
				'accordion-down': {
					from: { height: 0 },
					to: { height: 'var(--radix-accordion-content-height)' },
				},
				'accordion-up': {
					from: { height: 'var(--radix-accordion-content-height)' },
					to: { height: 0 },
				},
				'piece-drop': {
					'0%': { transform: 'scale(0)', opacity: '0' },
					'50%': { transform: 'scale(1.1)', opacity: '1' },
					'100%': { transform: 'scale(1)', opacity: '1' },
				},
				'fade-in': {
					'0%': { opacity: '0' },
					'100%': { opacity: '1' },
				},
				'slide-up': {
					'0%': { transform: 'translateY(10px)', opacity: '0' },
					'100%': { transform: 'translateY(0)', opacity: '1' },
				},
			},
			animation: {
				'accordion-down': 'accordion-down 0.2s ease-out',
				'accordion-up': 'accordion-up 0.2s ease-out',
				'piece-drop': 'piece-drop 250ms ease-out',
				'fade-in': 'fade-in 200ms ease-out',
				'slide-up': 'slide-up 250ms ease-out',
			},
		},
	},
	plugins: [require('tailwindcss-animate')],
}